<?php 
include TMPL_PATH.'public/header.phtml';
?>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
        <a href='javascript:;' class="on"><em>秒杀活动列表</em></a>  
        <span>|</span>
        <a href='<?php echo U('Activity/seckill_pro','add=1'); ?>' ><em>添加秒杀活动</em></a>
        <span>|</span>
        <a href='<?php echo U('Activity/seckill_result')?>'><em>秒杀活动结果</em></a>
    </div>
</div>
<div class="pad_10">
<div class="table-list">
    <table width="100%" cellspacing="0">
      <thead>
          <tr>
            <th align="center">秒杀活动编号</th>
            <th align="center">秒杀开始时间</th>
            <th align="center">开放抢购套数</th>
            <th align="center">秒杀时间</th>
            <th align="center">活动状态</th>
            <th align="center" width="40%" >操作</th>
          </tr>
      </thead>
                <tbody>
                    <?php 
                    foreach($list as $k=>$v):?>
                    <tr>
                        <td align="center"><?php echo $v['seckill_sn']?></td>
                        <td align="center"><?php echo date('Y-m-d H:i:s', $v['start_time'])?></td>
                        <td align="center"><?php echo '种类:'.$v['pcount'].'<br />'.'套数:'.$v['pnum']?></td>
                        <td align="center"><?php echo '秒杀时间'.($v['end_time']-$v['start_time']).'秒';echo '<br />';echo date('Y-m-d H:i:s', $v['end_time']);?></td>
                        <td align="center"><?php echo $v['statestr']?></td>
                        <td align="center">
                            <?php if( $v['state'] == 0 ): ?>
                                <a href='<?php echo U('Activity/seckill_pro', 'edit=1&fid='.$v['id']); ?>' >修改</a>
                                &nbsp;&nbsp;|&nbsp;&nbsp;
                                <a href='javascript:confirmurl("<?php echo U('Activity/seckill_pro', 'del=1&fid='.$v['id']); ?>","确认要删除此活动吗？？？")' >删除</a> 
                            <?php endif;?>
                        </td>
                    </tr>
                    <?php endforeach;?>
		</tbody>
	</table>
	<div id="pages"><?php echo $pageShow;?></div>
</div>
</div>
</body>
</html>
